package edu.zzu.service;

import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: GaoPeng
 * @Date: 2021/3/25 18:44
 */
@Service
@CrossOrigin
@RequestMapping("/packageRouteService")
public interface PackageRouteService {

    /**
     * 通过运单号得到包裹的路径
     * @param id
     * @return json格式的包裹路径信息，包括：id：记录id，没啥用,packageId：运单号,time：更新时间,transNodeId：转运节点的编号,handler：处理人,status：状态
     */
    @GetMapping("/getPackageRouteByPackageId/{id}")
    String getPackageRouteByPackageId(@PathVariable String id);

    @GetMapping("/getPackageRouteDetailByPackageId/{id}")
    String getPackageRouteDetailByPackageId(@PathVariable String id);

    @GetMapping("/getAddressByTransNodeId/{id}")
    String getAddressByTransNodeId(@PathVariable Long id);
}
